/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package facades;

import eao.*;
import entidades.*;
import javax.ejb.Stateless;
import javax.ejb.LocalBean;

import java.util.List;
import javax.annotation.security.DeclareRoles;
import javax.annotation.security.RolesAllowed;
import javax.ejb.EJB;

/**
 *
 * @author konecta
 */

@Stateless
public class AdminFacade implements AdminFacadeLocal  {

    @EJB
    UsuariosEAOLocal userEAO;
    
    @EJB
    ClientesEAOLocal clienteEAO;
    
    
    @Override
    public List<Usuarios> listarUsuarios(){ //throws ListaVaciaException 
       
        System.out.println( "llegue hasta AdminFacade!!!!!" );
        //return null;
        return userEAO.listarUsuarios();
    }
    
     @Override
    public List<Cliente> listarClientes(){ //throws ListaVaciaException        
        
        //return null;
        return clienteEAO.listarClientes();
    }

    @Override
    public void createCliente(Cliente cliente) {
        clienteEAO.create(cliente);        
    }
     
    
}
